home *** CD-ROM | disk | FTP | other *** search
/ VRML 2.0 Sourcebook (2nd Edition) / VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso / book / mac / ch08 / 08fig04.wrl < prev    next >
Text File  |  1996-09-23  |  742b  |  38 lines

  1. #VRML V2.0 utf8
  2. # The VRML 2.0 Sourcebook
  3. # Copyright 1997 By
  4. # Andrea L. Ames, David R. Nadeau, and John L. Moreland
  5. Group {
  6.     children [
  7.     # Rotating cylinder
  8.         DEF Column Transform {
  9.             rotation 0.0 0.0 1.0 0.0
  10.             children Shape {
  11.                 appearance Appearance {
  12.                     material Material { }
  13.                 }
  14.                 geometry Cylinder {
  15.                     height 1.0
  16.                     radius 0.2
  17.                 }
  18.             }
  19.         },
  20.     # Animation clock
  21.         DEF Clock TimeSensor {
  22.             cycleInterval 4.0
  23.             loop TRUE
  24.         },
  25.     # Animation path
  26.         DEF ColumnPath OrientationInterpolator {
  27.             key [ 0.0, 0.50, 1.0 ]
  28.             keyValue [
  29.                 0.0 0.0 1.0  0.0,
  30.                 0.0 0.0 1.0  3.14,
  31.                 0.0 0.0 1.0  6.28
  32.             ]
  33.         }
  34.     ]
  35. }
  36. ROUTE Clock.fraction_changed   TO ColumnPath.set_fraction
  37. ROUTE ColumnPath.value_changed TO Column.set_rotation
  38.